<!--suppress ALL -->
<include file="./Template/header.html" />

<link rel="stylesheet" type="text/css" href="/Template/css/caseList.css?v=20210316">
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">

    $(function() {

        //初始化页面配置
        document.title = "医院列表";

        var app = new Vue({
            el: '#container',
            data: {
                hospitalList: [],
            },
            methods: {
                hospitalDetail: function(id) {
                    window.location.href = "/wechat/hospitalProduct/hospital/id/"+id;
                },
            }
        })

        function getHospitalList() {
            $.ajax({
                url:"/wechat/hospitalProduct/hospitalList",
                type:"post",
                data:{
                },
                dataType:"JSON",
                beforeSend:function(){
                    $("#loadingToast").show();
                },
                complete:function(){
                    $('#loadingToast').hide();
                },
                success:function(data){
                    app.hospitalList = data;
                },
            })
        }
        getHospitalList();
    });


</script>

<div class="container">
    <div class="no-data" v-if="hospitalList == null")>暂无数据</div>

    <div>
        <div v-for="hospital in hospitalList">
            <div class="caselist-info" v-on:click="hospitalDetail(hospital.hospital_id)">
                <div class="item">
                    <span style="color: #927bcc" v-if="$index%2 == 0">{{hospital.hospital_name}}</span>
                    <span style="color: #4293e0" v-if="$index%2 != 0">{{hospital.hospital_name}}</span>
                    <img class="icon-right" src="/Template/images/icon-right.png" alt="">
                </div>
            </div>
        </div>
    </div>


</div>
<include file="./Template/footer.html" />

